// src/router/index.js
import { createRouter, createWebHashHistory } from 'vue-router'
 
// createRouter 创建路由实例
const router = createRouter({
  history: createWebHashHistory(), // hash模式：createWebHashHistory，history模式：createWebHistory
  routes: [
	{
		path: '/',
		name: 'home',
		component: () => import('../page/home/index.vue'),
		meta: {
            navFooterShow: true,
		}
	},
	{
		path: '/add',
		name: 'add',
		component: () => import('../page/add/index.vue'),
		meta: {
			navFooterShow: true,
		}
	},
	{
		path: '/echarts',
		name: 'echarts',
		component: () => import('../page/echarts/index.vue'),
		meta: {
			navFooterShow: true,
		}
	},
	{
		path: '/my',
		name: 'my',
		component: () => import('../page/my/index.vue'),
		meta: {
			navFooterShow: true,
		}
      },
      {
		path: '/login',
		name: 'login',
		component: () => import('../page/login/index.vue'),
		meta: {
			navFooterShow: false,
		}
	}
]
})
 
// 抛出路由实例, 在 main.js 中引用
export default router
